JOIN <expression> <entity name> {,<priority>}
JOIN 4 EntA
JOIN Var1 EntA, 1
Joins a specified quantity of a designated entity type to the current entity. The entities joined to the current entity lose their identities and any resources owned by the joining entities are transferred automatically to the base entity. Use JOIN to simulate a component being assembled to a main part, such as when wings are attached to the fuselage of an airplane.
Entities to be joined must be routed to the current location with a JOIN rule. The current entity waits until enough entities to fill its request have been routed to the current location with a JOIN rule.
The resulting entity retains the attributes and name of the base entity. To transfer attributes from the joining entity to the current entity, in the exit logic for the joining entity, copy the desired attribute to a global variable. Then assign the global variable to the attribute of the base entity after the JOIN statement in the processing logic.
All resources owned by the joining entity are transferred to the base entity. To JOIN an entity with a specific attribute value to another entity with the same attribute value, use the LOAD PERM statement .
Operation logic only. More than one JOIN statement may be used in the same logic.
<expression>
The number of entities to be joined. A zero value is ignored and a negative value generates an error. This expression is evaluated when each entity first encounters it, but is not re-evaluated as the requested entities are joined.
<entity name>
The entity type to be joined to the base entity. Joining entities must come from a JOIN routing and lose their identity once joined.
<priority>
An entity with a higher priority will have arriving entities joined to it before one with a lower priority. This expression should be a number between 0 and 999. For more information on priorities, see Priorities, at the beginning of this section.
JOIN passes cost on to the base entity but not statistical information.
Entity... |
Location... |
Operation (min)... |
Sample |
Lab |
WAIT 30 MATCH ID |
Patient |
Wait_Rm |
MATCH ID JOIN 1 Results |
Blk |
Output... |
Destination... |
Rule... |
Move Logic... |
1 |
Results |
Wait_Rm |
JOIN 1 |
MOVE WITH Tech THEN FREE |
1 |
Patient |
Clinic |
FIRST 1 |
MOVE FOR 5 |
See Also
LOAD, COMBINE, and GROUP. Also see Attributes and the JOIN or LOAD PERM Statement.
![]() |
© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com |